Skip to content

Fix/disallow attach inline datum #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nielstron
Copy link
Contributor

fixes #324

@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.50%. Comparing base (efbc2d2) to head (536d1bc).
Report is 1 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #325      +/-   ##
==========================================
+ Coverage   83.42%   83.50%   +0.08%     
==========================================
  Files          29       29              
  Lines        3705     3699       -6     
  Branches      929      926       -3     
==========================================
- Hits         3091     3089       -2     
+ Misses        448      445       -3     
+ Partials      166      165       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cffls
Copy link
Collaborator

cffls commented Mar 4, 2024

Looks like an integration test failed due to this change. It turns out the datum from utxo is a datum hash, instead of the actual datum. I think we should allow datum to be attached if its hash was attached to an output. Something like this:

if datum is not None and utxo.output.datum_hash is None and utxo.output.datum is not None:

@nielstron nielstron merged commit 0fec24a into Python-Cardano:main Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pycardano does not prevent adding datums for script inputs with inline datums
3 participants